#include <iostream>
#include <string>
using namespace std;
int main(){
	string a,b;
	int c[101];
	cin>>a;
	cin>>b;
	int len1,len2;
	len1=a.length() ;
	len2=b.length() ;

	int flag=1;
	int max=0;
	if(len1>len2){
		max=len1;
	}else{
		max=len2;
	}
	for(int i=0;i<101;i++){
		while(len1!=0 && len2!=0){
	if(flag%2==1){
			c[i]=(b[len2]+a[len1])%13;
			len1--;
			len2--;
	}else if(flag%2==0){
			if(b[len2]-a[len1]>=0){
						c[i]=b[len2]-a[len1];
		}else if(b[len2]-a[len1]<0){
				c[i]=b[len2]-a[len1]+10;
				if(c[i]==10){
					c[i]=='J';
				}
				if(c[i]==11){
					c[i]=='Q';
				}
				if(c[i]==12){
					c[i]=='K';
				}
				len1--;
				len2--;
		}
	}			
		}

}

for(int i=0;i<max;i++){
	cout<<c[i];
}
		
	
return 0;	
} 
